window.map = new BMap.Map('map');
var poi = new BMap.Point(106.468924, 29.561331);
var mar = new BMap.Marker(poi)
mar.disableMassClear();
map.addOverlay(mar);    //添加标注
// map.centerAndZoom("重庆",16);      // 初始化地图,用城市名设置地图中心点
map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
map.centerAndZoom(poi, 15);
map.enableScrollWheelZoom();
//右下角，添加比例尺
var bottom_left_ScaleControl = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
//右下角，添加默认缩放平移控件
var bottom_left_navigation = new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
//添加控件和比例尺
function add_control() {
    map.addControl(bottom_left_ScaleControl);
    map.addControl(bottom_left_navigation);
}
add_control();
/*
//移除比例尺
function delete_control(){
    map.removeControl(bottom_left_ScaleControl);
    map.removeControl(top_left_navigation);
}*/
